/* 
 * File:   swaping.h
 * Author: privalov
 *
 * Created on 17 Апрель 2014 г., 18:26
 */

#ifndef SWAPING_H
#define	SWAPING_H
#ifdef	__cplusplus
extern "C" {
#endif
    /*opens file*/
    int swap_init(const char* swap_path, off_t swap);
    /*puts data in swap. Sets "something bad with swap file" error*/
    int mem2swap(void* src_ptr, off_t dest_offset, size_t size);
    /*get data from swap. Sets "something bad with swap file" error*/
    int swap2mem(off_t src_offset, void* dest_ptr, size_t size);
    /**/
    int swap2swap(off_t src_offset, off_t dest_offset, size_t size);
    /*closes file*/
    void swap_deinit();


#ifdef	__cplusplus
}
#endif

#endif	/* SWAPING_H */

